using System;
using System.Collections.Generic;
using System.Text;
using AF_ORM.CORE;
using System.Data;
using System.Configuration;
using Bussiness.Config;     
using Bussiness.Entity;
namespace Bussiness.ManagerBase
{
                

     public abstract class PT_ConfigManagerBase
    {
        public PT_ConfigManagerBase()
        {
            Adapter.ConnectionString =  ConnectionConfig.ConnectionString;            
        }
                    
 
        /// <summary>
        /// Them moi du lieu
        /// </summary>
        /// <returns>PT_ConfigEntity</returns>
        public PT_ConfigEntity Insert(PT_ConfigEntity obj)
        { 
            return (PT_ConfigEntity) Adapter.Insert(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo khoa chinh cua object
        /// </summary>
        /// <returns>PT_ConfigEntity</returns>
        public PT_ConfigEntity Update(PT_ConfigEntity obj)
        { 
            return (PT_ConfigEntity)Adapter.Update(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo dieu kien trong object
        /// </summary>
        /// <returns>PT_ConfigEntity</returns>
        public PT_ConfigEntity UpdateWithCondition(PT_ConfigEntity obj,PT_ConfigEntity objCond)
        { 
            return (PT_ConfigEntity)Adapter.UpdateWithCondition(obj,objCond);             
        }
 
 
        public PT_ConfigEntity Delete(PT_ConfigEntity obj)
        { 
            return (PT_ConfigEntity)Adapter.Delete(obj);             
        }
 
 
        public PT_ConfigEntity DeleteWithCondition(PT_ConfigEntity objCond)
        { 
            return (PT_ConfigEntity)Adapter.DeleteWithCondition(objCond);             
        }
 


        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien ConfigCode duoc set trong object
        /// </summary>
        /// <returns>PT_ConfigEntity</returns>
        public PT_ConfigEntity DeleteByConfigCode (PT_ConfigEntity obj)
        { 
            return (PT_ConfigEntity)Adapter.DeleteByField(obj,"ConfigCode");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien ConfigCode 
        /// </summary>
        /// <returns>PT_ConfigEntity</returns>
        public PT_ConfigEntity DeleteByConfigCode (string ConfigCode )
        { 
            PT_ConfigEntity obj = new PT_ConfigEntity();
            obj.ConfigCode = ConfigCode;  
            return (PT_ConfigEntity)Adapter.DeleteByField(obj,"ConfigCode");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien ConfigDescritption duoc set trong object
        /// </summary>
        /// <returns>PT_ConfigEntity</returns>
        public PT_ConfigEntity DeleteByConfigDescritption (PT_ConfigEntity obj)
        { 
            return (PT_ConfigEntity)Adapter.DeleteByField(obj,"ConfigDescritption");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien ConfigDescritption 
        /// </summary>
        /// <returns>PT_ConfigEntity</returns>
        public PT_ConfigEntity DeleteByConfigDescritption (string ConfigDescritption )
        { 
            PT_ConfigEntity obj = new PT_ConfigEntity();
            obj.ConfigDescritption = ConfigDescritption;  
            return (PT_ConfigEntity)Adapter.DeleteByField(obj,"ConfigDescritption");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien ConfigValue duoc set trong object
        /// </summary>
        /// <returns>PT_ConfigEntity</returns>
        public PT_ConfigEntity DeleteByConfigValue (PT_ConfigEntity obj)
        { 
            return (PT_ConfigEntity)Adapter.DeleteByField(obj,"ConfigValue");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien ConfigValue 
        /// </summary>
        /// <returns>PT_ConfigEntity</returns>
        public PT_ConfigEntity DeleteByConfigValue (string ConfigValue )
        { 
            PT_ConfigEntity obj = new PT_ConfigEntity();
            obj.ConfigValue = ConfigValue;  
            return (PT_ConfigEntity)Adapter.DeleteByField(obj,"ConfigValue");
        }

 
        /// <summary>
        /// Lay du lieu theo khoa chinh object
        /// </summary>
        /// <returns></returns>
        public PT_ConfigEntity Select(PT_ConfigEntity obj)
        { 
            return (PT_ConfigEntity) Adapter.Select(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(PT_ConfigEntity obj)
        { 
            return  Adapter.SelectWithCondition(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(PT_ConfigEntity obj,SelectOptions option)
        {             
            return  Adapter.SelectWithCondition(obj,option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll()
        { 
            return Adapter.SelectAll(new PT_ConfigEntity());             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll(SelectOptions option)
        { 
            return Adapter.SelectAll(new PT_ConfigEntity(),option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<PT_ConfigEntity> SelectAllLST()
        { 
            return  (List<PT_ConfigEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new PT_ConfigEntity()),new PT_ConfigEntity());           
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<PT_ConfigEntity> SelectAllLST(SelectOptions option)
        { 
            return (List<PT_ConfigEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new PT_ConfigEntity(),option),new PT_ConfigEntity());             
        }
 

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigCode duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByConfigCode (PT_ConfigEntity obj)
        { 
            return Adapter.SelectByField(obj,"ConfigCode");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigCode duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByConfigCode (PT_ConfigEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"ConfigCode",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigCode duoc set trong object
        /// </summary>
        /// <returns>List<PT_ConfigEntity></returns>
        public List<PT_ConfigEntity> SelectByConfigCodeLST (PT_ConfigEntity obj)
        { 
            return  (List<PT_ConfigEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ConfigCode"),new PT_ConfigEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigCode duoc set trong object
        /// </summary>
        /// <returns>List<PT_ConfigEntity></returns>
        public List<PT_ConfigEntity> SelectByConfigCodeLST (PT_ConfigEntity obj,SelectOptions option)
        { 
            return  (List<PT_ConfigEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"ConfigCode",option),new PT_ConfigEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigCode 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByConfigCode (string ConfigCode )
        { 
            PT_ConfigEntity obj = new PT_ConfigEntity();
            obj.ConfigCode = ConfigCode;  
            return Adapter.SelectByField(obj,"ConfigCode");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigCode duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByConfigCode (string ConfigCode, SelectOptions option)
        { 
            PT_ConfigEntity obj = new PT_ConfigEntity();
            obj.ConfigCode = ConfigCode;  
            return Adapter.SelectByField(obj,"ConfigCode",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigCode 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_ConfigEntity> SelectByConfigCodeLST (string ConfigCode )
        { 
            PT_ConfigEntity obj = new PT_ConfigEntity();
            obj.ConfigCode = ConfigCode;  
            return  (List<PT_ConfigEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ConfigCode"),new PT_ConfigEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigCode duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_ConfigEntity> SelectByConfigCodeLST (string ConfigCode, SelectOptions option)
        { 
            PT_ConfigEntity obj = new PT_ConfigEntity();
            obj.ConfigCode = ConfigCode;  
            return  (List<PT_ConfigEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ConfigCode",option),new PT_ConfigEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigDescritption duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByConfigDescritption (PT_ConfigEntity obj)
        { 
            return Adapter.SelectByField(obj,"ConfigDescritption");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigDescritption duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByConfigDescritption (PT_ConfigEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"ConfigDescritption",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigDescritption duoc set trong object
        /// </summary>
        /// <returns>List<PT_ConfigEntity></returns>
        public List<PT_ConfigEntity> SelectByConfigDescritptionLST (PT_ConfigEntity obj)
        { 
            return  (List<PT_ConfigEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ConfigDescritption"),new PT_ConfigEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigDescritption duoc set trong object
        /// </summary>
        /// <returns>List<PT_ConfigEntity></returns>
        public List<PT_ConfigEntity> SelectByConfigDescritptionLST (PT_ConfigEntity obj,SelectOptions option)
        { 
            return  (List<PT_ConfigEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"ConfigDescritption",option),new PT_ConfigEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigDescritption 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByConfigDescritption (string ConfigDescritption )
        { 
            PT_ConfigEntity obj = new PT_ConfigEntity();
            obj.ConfigDescritption = ConfigDescritption;  
            return Adapter.SelectByField(obj,"ConfigDescritption");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigDescritption duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByConfigDescritption (string ConfigDescritption, SelectOptions option)
        { 
            PT_ConfigEntity obj = new PT_ConfigEntity();
            obj.ConfigDescritption = ConfigDescritption;  
            return Adapter.SelectByField(obj,"ConfigDescritption",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigDescritption 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_ConfigEntity> SelectByConfigDescritptionLST (string ConfigDescritption )
        { 
            PT_ConfigEntity obj = new PT_ConfigEntity();
            obj.ConfigDescritption = ConfigDescritption;  
            return  (List<PT_ConfigEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ConfigDescritption"),new PT_ConfigEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigDescritption duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_ConfigEntity> SelectByConfigDescritptionLST (string ConfigDescritption, SelectOptions option)
        { 
            PT_ConfigEntity obj = new PT_ConfigEntity();
            obj.ConfigDescritption = ConfigDescritption;  
            return  (List<PT_ConfigEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ConfigDescritption",option),new PT_ConfigEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigValue duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByConfigValue (PT_ConfigEntity obj)
        { 
            return Adapter.SelectByField(obj,"ConfigValue");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigValue duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByConfigValue (PT_ConfigEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"ConfigValue",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigValue duoc set trong object
        /// </summary>
        /// <returns>List<PT_ConfigEntity></returns>
        public List<PT_ConfigEntity> SelectByConfigValueLST (PT_ConfigEntity obj)
        { 
            return  (List<PT_ConfigEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ConfigValue"),new PT_ConfigEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigValue duoc set trong object
        /// </summary>
        /// <returns>List<PT_ConfigEntity></returns>
        public List<PT_ConfigEntity> SelectByConfigValueLST (PT_ConfigEntity obj,SelectOptions option)
        { 
            return  (List<PT_ConfigEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"ConfigValue",option),new PT_ConfigEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigValue 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByConfigValue (string ConfigValue )
        { 
            PT_ConfigEntity obj = new PT_ConfigEntity();
            obj.ConfigValue = ConfigValue;  
            return Adapter.SelectByField(obj,"ConfigValue");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigValue duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByConfigValue (string ConfigValue, SelectOptions option)
        { 
            PT_ConfigEntity obj = new PT_ConfigEntity();
            obj.ConfigValue = ConfigValue;  
            return Adapter.SelectByField(obj,"ConfigValue",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigValue 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_ConfigEntity> SelectByConfigValueLST (string ConfigValue )
        { 
            PT_ConfigEntity obj = new PT_ConfigEntity();
            obj.ConfigValue = ConfigValue;  
            return  (List<PT_ConfigEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ConfigValue"),new PT_ConfigEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ConfigValue duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<PT_ConfigEntity> SelectByConfigValueLST (string ConfigValue, SelectOptions option)
        { 
            PT_ConfigEntity obj = new PT_ConfigEntity();
            obj.ConfigValue = ConfigValue;  
            return  (List<PT_ConfigEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ConfigValue",option),new PT_ConfigEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<PT_ConfigEntity></returns>
        public List<PT_ConfigEntity> SelectWithConditionLST (PT_ConfigEntity obj)
        { 
            return  (List<PT_ConfigEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj),new PT_ConfigEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<PT_ConfigEntity></returns>
        public List<PT_ConfigEntity> SelectWithConditionLST (PT_ConfigEntity obj,SelectOptions option)
        { 
            return  (List<PT_ConfigEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj,option),new PT_ConfigEntity());
        }

}
}
